< previous page page_633 next page >

Page 633
8160-0633a.gif
Figure 31.1
The DateTimePicker control with different formats.
Common Properties of the DateTimePicker Control
The DateTimePicker control has a lot of properties. Some are used at design time, but the majority youll use at runtime. Table 31.1 presents a list of the most commonly used design-time properties and a description of what each of those properties can be used for.
Table 31.1 Common Properties of the DateTimePicker Control.
PropertyDescription
CustomFormatThis property can be set to a series of format characters that you can put together in a certain order to make the control display the date in the format you want. See the online help for the complete list of format characters you can use.
FormatThis property can be set to one of four values. See the section, The Format Property, for more information on this property.
MaxDateIf you set this property, the user will be forced to select a date less than or equal to the specified date.
MinDateIf you set this property, the user will be forced to select a date greater than or equal to the specified date.
UpDownSet this property to True if you want the user to use the UpDown arrow to the right of the control to increment any of the parts of the date (month, day, and year).
ValueThis property reports back the date the user inputs or selects from the drop-down calendar. Also, you can use this property to set a default date on the control at design time.

 
< previous page page_633 next page >

If you like this book, buy it!